Graphics2D pg = pimg.createGraphics();
pg.translate(-bounds.x, -bounds.y);
pg.setClip(shape);
for (Tile t : tiles.values()) t.paint(pg);
pg.dispose();
if (!copy) {
Shape sc = clip;
Graphics2D pg = pimg.createGraphics();
pg.translate(-bounds.x, -bounds.y);
pg.setClip(shape);
ts.paint(pg);
pg.dispose();
if (!copy) {
Shape sc = clip;